package org.hxyjs.utils;

import org.hxyjs.utils.messageFactory.MakeMessage;
import org.hxyjs.vo.MailUser;

public class MailMessageUtils {
    public static String[] getMessage(MailUser mailUser, String op) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
      String[] ops = op.split(":");
      String modelClassName = "org.hxyjs.utils.messageFactory."+ops[0]+"MessageFactory";//取出处理消息的模块
        MakeMessage makeMessage = (MakeMessage)Class.forName(modelClassName).newInstance();
       return makeMessage.getMessage(mailUser,ops[1]);//将反序列出的邮件对象（邮件内容来自于它）和ops[1]（操作）传入消息产生方法；

    }
}
